<template>
    <el-form
        ref="ruleFormRef"
        :model="ruleForm"
        :rules="rules"
        label-width="auto"
        class="demo-ruleForm"
        status-icon
        :inline="true"
    >
        <el-form-item
            label="所属单位："
            prop="depId"
            required
        >
            <el-select
                v-model="ruleForm.depId"
                class="m-2"
                placeholder="请选择所属单位"
                style="width: 300px"
                :disabled="true"
            >
                <el-option
                    v-for="item in depIdList"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                />
            </el-select>
        </el-form-item>

        <el-form-item
            label="计划名称："
            prop="planName"
            required
        >
            <el-input
                v-model="ruleForm.planName"
                style="width: 300px"
            />
        </el-form-item>
        <el-form-item
            label="计划起止日期："
            prop="planTime"
            required
        >
            <el-date-picker
                style="width: 278px"
                v-model="ruleForm.planTime"
                type="daterange"
                unlink-panels
                range-separator="至"
                start-placeholder="开始时间"
                end-placeholder="结束时间"
                :size="'default'"
                :shortcuts="shortcuts"
            />
        </el-form-item>
        <!-- 
            <el-form-item label="" prop="name">
                <el-checkbox
                    v-model="searchForm.continuous"
                    label="连续"
                    size="large"
                />
            </el-form-item> -->
        <el-form-item
            label="保养级别："
            prop="upkeepLevel"
            required
        >
            <el-select
                v-model="ruleForm.upkeepLevel"
                placeholder=""
                style="width: 300px"
            >
                <el-option
                    v-for="item in upkeepLevelList"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                />
            </el-select>
        </el-form-item>

        <el-form-item
            label="设置节假日："
            prop="isHodiday"
        >
            <el-checkbox
                v-model="ruleForm.isHodiday"
                label="节假日正常保养"
                size="default"
            />
        </el-form-item>
        <el-form-item
            label="计划模式："
            prop="planMode"
            required
        >
            <el-select
                v-model="ruleForm.planMode"
                placeholder=""
                style="width: 300px"
            >
                <!-- <el-option label="按班" value="按班" /> -->
                <el-option
                    label="按天"
                    value="按天"
                />
                <el-option
                    label="按周"
                    value="按周"
                />
                <el-option
                    label="按月"
                    value="按月"
                />
                <el-option
                    label="按年"
                    value="按年"
                />
            </el-select>
        </el-form-item>
        <el-form-item
            label=""
            prop=""
            style="width: 100%"
        >
            <div
                class="modelItem"
                v-if="ruleForm.planMode == '按班'"
            >
                <el-radio-group v-model="classModelRadio">
                    <el-radio label="1">
                        <span class="radioItem">每</span>
                        <el-input
                            class="radioItem"
                            v-model="ruleForm.number"
                            style="width: 60px"
                        />
                        <span class="radioItem">班</span>
                    </el-radio>
                    <el-radio label="2">
                        <span class="radioItem">每个</span>
                        <el-select
                            v-model="ruleForm.classes"
                            placeholder=""
                            style="width: 180px"
                        >
                            <el-option
                                :label="item.label"
                                :value="item.value"
                                v-for="item in classesShowList"
                                :key="item.value"
                            />
                        </el-select>
                    </el-radio>
                </el-radio-group>
            </div>
            <div
                class="modelItem"
                v-if="ruleForm.planMode == '按天'"
            >
                <el-radio-group v-model="classModelRadio">
                    <el-radio label="1">
                        <span class="radioItem">每</span>
                        <el-input
                            class="radioItem"
                            v-model="ruleForm.dayNumber"
                            style="width: 40px"
                        />
                        <span class="radioItem">天</span>
                    </el-radio>
                    <el-radio label="2">
                        <span class="radioItem">每个工作日</span>
                    </el-radio>
                </el-radio-group>
            </div>
            <div
                class="modelItem"
                v-if="ruleForm.planMode == '按周'"
            >
                <span class="radioItem">每</span>
                <el-input
                    class="radioItem"
                    v-model="ruleForm.weekNumber"
                    style="width: 40px"
                />
                <span class="radioItem">周的</span>
                <el-checkbox-group
                    v-model="checkList"
                    style="display: inline-block"
                >
                    <el-checkbox
                        label="星期一"
                        value="星期一"
                    />
                    <el-checkbox
                        label="星期二"
                        value="星期二"
                    />
                    <el-checkbox
                        label="星期三"
                        value="星期三"
                    />
                    <el-checkbox
                        label="星期四"
                        value="星期四"
                    />
                    <el-checkbox
                        label="星期五"
                        value="星期五"
                    />
                    <el-checkbox
                        label="星期六"
                        value="星期六"
                    />
                    <el-checkbox
                        label="星期日"
                        value="星期日"
                    />
                </el-checkbox-group>
            </div>
            <div
                class="modelItem"
                v-if="ruleForm.planMode == '按月'"
            >
                <el-radio-group v-model="classModelRadio">
                    <el-radio label="1">
                        <span class="radioItem">每</span>
                        <el-input
                            class="radioItem"
                            v-model="ruleForm.monthNumber"
                            style="width: 60px"
                        />
                        <span class="radioItem">个月的第</span>
                        <el-select
                            class="radioItem"
                            v-model="ruleForm.monthDayNumber"
                            placeholder=""
                            style="width: 60px"
                        >
                            <el-option
                                :label="item"
                                :value="item"
                                v-for="item in 31"
                                :key="item"
                            />
                            <el-option
                                label="最后1"
                                value="最后1"
                            />
                        </el-select>
                        <span class="radioItem">号</span>
                    </el-radio>
                    <el-radio label="2">
                        <span class="radioItem">每</span>
                        <el-input
                            class="radioItem"
                            v-model="ruleForm.monthNumber2"
                            style="width: 60px"
                        />
                        <span class="radioItem">个月的</span>
                        <el-select
                            class="radioItem"
                            v-model="ruleForm.weekNumber2"
                            placeholder=""
                            style="width: 90px"
                        >
                            <el-option
                                :label="item.label"
                                :value="item.value"
                                v-for="item in weekNumberList"
                                :key="item.value"
                            />
                        </el-select>
                        <el-select
                            class="radioItem"
                            v-model="ruleForm.weekday2"
                            placeholder=""
                            style="width: 90px"
                        >
                            <el-option
                                :label="item.label"
                                :value="item.value"
                                v-for="item in weekList"
                                :key="item.value"
                            />
                        </el-select>
                    </el-radio>
                </el-radio-group>
            </div>
            <div
                class="modelItem"
                v-if="ruleForm.planMode == '按年'"
            >
                <el-radio-group v-model="classModelRadio">
                    <el-radio label="1">
                        <span class="radioItem">每年</span>

                        <el-select
                            class="radioItem"
                            v-model="ruleForm.yearMonthNumber"
                            placeholder=""
                            style="width: 60px"
                        >
                            <el-option
                                :label="item"
                                :value="item"
                                v-for="item in 12"
                                :key="item"
                            />
                        </el-select>
                        <span class="radioItem">月的第</span>
                        <el-select
                            class="radioItem"
                            v-model="ruleForm.yearMonthDayNumber"
                            placeholder=""
                            style="width: 60px"
                        >
                            <el-option
                                :label="item"
                                :value="item"
                                v-for="item in 31"
                                :key="item"
                            />
                            <el-option
                                label="最后1"
                                value="最后1"
                            />
                        </el-select>
                        <span class="radioItem">号</span>
                    </el-radio>
                    <el-radio label="2">
                        <span class="radioItem">每年</span>

                        <el-select
                            class="radioItem"
                            v-model="ruleForm.yearMonthNumber2"
                            placeholder=""
                            style="width: 60px"
                        >
                            <el-option
                                :label="item"
                                :value="item"
                                v-for="item in 12"
                                :key="item"
                            />
                        </el-select>
                        <span class="radioItem">月的</span>
                        <el-select
                            class="radioItem"
                            v-model="ruleForm.yearWeekNumber"
                            placeholder=""
                            style="width: 90px"
                        >
                            <el-option
                                :label="item.label"
                                :value="item.value"
                                v-for="item in weekNumberList"
                                :key="item.value"
                            />
                        </el-select>
                        <el-select
                            class="radioItem"
                            v-model="ruleForm.yearWeek"
                            placeholder=""
                            style="width: 90px"
                        >
                            <el-option
                                :label="item.label"
                                :value="item.value"
                                v-for="item in weekList"
                                :key="item.value"
                            />
                        </el-select>
                    </el-radio>
                </el-radio-group>
            </div>
        </el-form-item>

        <el-form-item
            label="保养人员："
            prop="upkeepUserMode"
            style="width: 450px"
            required
        >
            <el-radio-group
                v-model="ruleForm.upkeepUserMode"
                @change="inspectionUserModeChange"
            >
                <el-radio label="当日值班班组">当日值班班组</el-radio>
                <el-radio label="固定班组">固定班组</el-radio>
                <el-radio label="固定人员">固定人员</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item
            label=""
            prop="upkeepUser"
        >
            <el-select
                v-model="ruleForm.upkeepUser"
                :placeholder="`请选择${ruleForm.upkeepUserMode}`"
                style="width: 200px"
            >
                <el-option
                    :label="item.label"
                    :value="item.value"
                    v-for="item in typeList"
                    :key="item.value"
                />
            </el-select>
        </el-form-item>
        <el-form-item
            label="消息提醒："
            prop="notice"
            required
        >
            <el-select
                v-model="ruleForm.notice"
                class="m-2"
                placeholder="请选择消息提醒"
                style="width: 300px"
            >
                <el-option
                    v-for="item in noticeList"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                />
            </el-select>
        </el-form-item>
    </el-form>
</template>

<script setup>
import equipmentHttp from "@/https/equipment.js";
import schedulingHttp from "@/https/scheduling.js";
import userHttp from "@/https/user.js";
import { ElMessage } from "element-plus";
import moment from "moment";
import { onMounted, reactive, ref, watch } from "vue";

const emits = defineEmits(["closedDialog"]);
const nowTime = new Date().getTime();
const day = new Date().getDay();
const oneDayTime = 24 * 60 * 60 * 1000;
const month = new Date().getMonth();
// 传入数据¸
const props = defineProps({
    type: {
        type: String,
        default: "",
    },
    addEqId: {
        type: [String, Number],
        default: "",
    },
    addEqDepId: {
        type: [String, Number],
        default: "",
    },
});
console.log(props.type);
let ruleForm = reactive({
    equipIds: "",
    depId: "",
    planName: "",
    upkeepLevel: "1",
    isHodiday: "",
    planTime: [],
    planMode: "按天",
    planModeNum: "",
    planModeItem: [],
    number: "1",
    classes: "",
    dayNumber: "1",
    weekNumber: "1",
    monthNumber: "1",
    monthDayNumber: "1",
    monthNumber2: "1",
    weekNumber2: "第一个",
    weekday2: "星期一",
    yearMonthNumber: "1",
    yearMonthDayNumber: "1",
    yearMonthNumber2: "1",
    yearWeekNumber: "第一个",
    yearWeek: "星期一",
    upkeepUserMode: "",
    upkeepUser: "",
    notice: "0",
});
const rules = reactive({
    depId: [
        {
            required: true,
            message: "请输入所属单位",
            trigger: "blur",
        },
    ],
    planName: [
        {
            required: true,
            message: "请输入计划名称",
            trigger: "blur",
        },
    ],
    planTime: [
        {
            required: true,
            message: "请输入计划起止日期",
            trigger: "blur",
        },
    ],
    upkeepLevel: [
        {
            required: true,
            message: "请选择保养级别",
            trigger: "blur",
        },
    ],
    planMode: [
        {
            required: true,
            message: "请选择计划模式",
            trigger: "blur",
        },
    ],
    upkeepUserMode: [
        {
            required: true,
            message: "请选择巡检人员",
            trigger: "blur",
        },
    ],
    notice: [
        {
            required: true,
            message: "请选择消息通知类型",
            trigger: "blur",
        },
    ],
});
const shortcuts = [
    {
        text: "本年",
        value: () => {
            return [
                moment().startOf("year"),
                moment().endOf("year"),
            ];
        },
    },
    {
        text: "本月",
        value: () => {
            return [
                moment().startOf("month"),
                moment().endOf("month"),
            ];
        },
    },
    {
        text: "下月",
        value: () => {
            return [
                moment().add(1, 'month').startOf("month"),
                moment().add(1, 'month').endOf("month"),
            ];
        },
    },
    {
        text: "本周",
        value: () => {
            return [
                moment().startOf("week"),
                moment().endOf("week"),
            ];
        },
    },
    {
        text: "下周",
        value: () => {
            return [
                moment().add(1, 'week').startOf("week"),
                moment().add(1, 'week').endOf("week"),
            ];
        },
    },
    {
        text: "本日",
        value: () => {
            return [
                moment(),
                moment(),
            ];
        },
    },
];
const depIdList = ref([
    { label: "公司", value: "1" },
    { label: "星沙厂", value: "2" },
    { label: "城西厂", value: "3" },
    { label: "城北厂", value: "4" },
    { label: "城南厂", value: "5" },
    { label: "城东厂", value: "6" },
]);

const noticeList = ref([
    { label: "无", value: "0" },
    { label: "当天", value: "1" },
    { label: "一天前", value: "2" },
    { label: "三天前", value: "3" },
    { label: "七天前", value: "4" },
]);
const typeList = ref([]);

const checkList = ref([]);
watch(
    () => ruleForm.depId,
    (val) => {
        getWorkClassQueryWorkClassShow();
        getWorkteamsQueryWorkTeams();
        userQueryUserList();
    },
    { deep: true }
);
watch(
    () => ruleForm.planMode,
    (val) => { },
    { deep: true }
);
watch(typeList, (val) => {
    console.log(val, "ruleForm.upkeepUserMode");
});
watch(
    () => ruleForm.upkeepUserMode,
    (val) => {
        // ruleForm.upkeepUser = "";
        if (val == "当日值班班组") {
            typeList.value = classesShowList.value;
        } else if (val == "固定班组") {
            typeList.value = groupList.value;
        } else if (val == "固定人员") {
            typeList.value = userList.value;
        }
        console.log(val, typeList.value, "val");
    },
    { deep: true }
);
const inspectionUserModeChange = () => {
    ruleForm.upkeepUser = "";
};
const weekNumberList = ref([
    {
        value: "第一个",
        label: "第一个",
    },
    {
        value: "第二个",
        label: "第二个",
    },
    {
        value: "第三个",
        label: "第三个",
    },
    {
        value: "第四个",
        label: "第四个",
    },
    {
        value: "最后一个",
        label: "最后一个",
    },
]);
const weekList = ref([
    {
        value: "星期一",
        label: "星期一",
    },
    {
        value: "星期二",
        label: "星期二",
    },
    {
        value: "星期三",
        label: "星期三",
    },
    {
        value: "星期四",
        label: "星期四",
    },
    {
        value: "星期五",
        label: "星期五",
    },
    {
        value: "星期六",
        label: "星期六",
    },
    {
        value: "星期日",
        label: "星期日",
    },
]);

const upkeepLevelList = ref([
    { label: "一级", value: "1" },
    { label: "二级", value: "2" },
    { label: "三级", value: "3" },
]);
const classModelRadio = ref("1");
console.log(props.type);
const handleAdd = (type) => {
    ruleForm.planName = "";
    ruleForm.upkeepLevel = "1";
    ruleForm.isHodiday = "";
    ruleForm.planTime = [];
    ruleForm.planMode = "按天";
    ruleForm.planModeNum = "";
    ruleForm.planModeItem = [];
    ruleForm.upkeepUserMode = "";
    ruleForm.upkeepUser = "";
    ruleForm.notice = "0";
};
watch(
    () => props.type,
    (val) => {
        console.log(val, "val");
    }
);
const handleClick = async (type, row) => {
    const res = await equipmentHttp.upkeepPlanGetById(props.addEqId);
    if (res.data.code == "200") {
        ruleForm.id = res.data.data.id + "";
        ruleForm.depId = res.data.data.depId + "";
        ruleForm.planName = res.data.data.planName + "";
        ruleForm.planTime = [res.data.data.startDate, res.data.data.endDate];
        ruleForm.upkeepLevel = res.data.data.upkeepLevel;
        ruleForm.isHodiday = res.data.data.isHodiday == "1";
        ruleForm.planMode = res.data.data.planMode;
        ruleForm.planModeNum = res.data.data.planModeNum;
        classModelRadio.value = res.data.data.planModeNum + "";
        ruleForm.planModeItem = JSON.parse(res.data.data.planModeItem);
        console.log(ruleForm.planModeItem);

        if (res.data.data.planMode == "按班") {
            if (classModelRadio.value == "1") {
                ruleForm.number = ruleForm.planModeItem[0];
            } else if (classModelRadio.value == "2") {
                ruleForm.classes = ruleForm.planModeItem[0] + "";
            }
        } else if (res.data.data.planMode == "按天") {
            if (classModelRadio.value == "1") {
                ruleForm.dayNumber = ruleForm.planModeItem[0];
            }
        } else if (res.data.data.planMode == "按周") {
            ruleForm.weekNumber = ruleForm.planModeItem[0];
            ruleForm.planModeItem.shift();
            checkList.value = ruleForm.planModeItem;
            console.log(ruleForm.weekNumber, checkList.value);
        } else if (res.data.data.planMode == "按月") {
            if (classModelRadio.value == "1") {
                ruleForm.monthNumber = ruleForm.planModeItem[0];
                ruleForm.monthDayNumber = ruleForm.planModeItem[1];
            } else if (classModelRadio.value == "2") {
                ruleForm.monthNumber2 = ruleForm.planModeItem[0];
                ruleForm.weekNumber2 = ruleForm.planModeItem[1];
                ruleForm.weekday2 = ruleForm.planModeItem[2];
            }
        } else if (res.data.data.planMode == "按年") {
            if (classModelRadio.value == "1") {
                ruleForm.yearMonthNumber = ruleForm.planModeItem[0];
                ruleForm.yearMonthDayNumber = ruleForm.planModeItem[1];
            } else if (classModelRadio.value == "2") {
                ruleForm.yearMonthNumber2 = ruleForm.planModeItem[0];
                ruleForm.yearWeekNumber = ruleForm.planModeItem[1];
                ruleForm.yearWeek = ruleForm.planModeItem[2];
            }
        }
        ruleForm.upkeepUserMode = res.data.data.upkeepUserMode + "";
        console.log(typeList.value, "upkeepUser");
        ruleForm.upkeepUser = res.data.data.upkeepUser + "";
        ruleForm.notice = res.data.data.notice + "";
        ruleForm.detailList = res.data.data.detailList;
        console.log(ruleForm.detailList, "ruleForm.detailList.value");
    }
};
const ruleFormRef = ref(null);
const submit = async () => {
    console.log(11111);
    await ruleFormRef.value.validate(async (valid, fields) => {
        if (valid) {
            ruleForm.planModeNum = classModelRadio.value;
            ruleForm.planModeItem = [];
            console.log(classModelRadio.value);
            if (ruleForm.planMode == "按班") {
                if (classModelRadio.value == "1") {
                    ruleForm.planModeItem.push(ruleForm.number);
                } else if (classModelRadio.value == "2") {
                    ruleForm.planModeItem.push(ruleForm.classes);
                }
            } else if (ruleForm.planMode == "按天") {
                if (classModelRadio.value == "1") {
                    ruleForm.planModeItem.push(ruleForm.dayNumber);
                } else if (classModelRadio.value == "2") {
                    ruleForm.planModeItem.push("1");
                }
            } else if (ruleForm.planMode == "按周") {
                let arr = [];
                arr.push(ruleForm.weekNumber);
                ruleForm.planModeItem = arr.concat(checkList.value);
            } else if (ruleForm.planMode == "按月") {
                if (classModelRadio.value == "1") {
                    ruleForm.planModeItem.push(ruleForm.monthNumber);
                    ruleForm.planModeItem.push(ruleForm.monthDayNumber);
                } else if (classModelRadio.value == "2") {
                    ruleForm.planModeItem.push(ruleForm.monthNumber2);
                    ruleForm.planModeItem.push(ruleForm.weekNumber2);
                    ruleForm.planModeItem.push(ruleForm.weekday2);
                }
            } else if (ruleForm.planMode == "按年") {
                if (classModelRadio.value == "1") {
                    ruleForm.planModeItem.push(ruleForm.yearMonthNumber);
                    ruleForm.planModeItem.push(ruleForm.yearMonthDayNumber);
                } else if (classModelRadio.value == "2") {
                    ruleForm.planModeItem.push(ruleForm.yearMonthNumber2);
                    ruleForm.planModeItem.push(ruleForm.yearWeekNumber);
                    ruleForm.planModeItem.push(ruleForm.yearWeek);
                }
            }
            let params = {
                ...ruleForm,
                startDate: moment(ruleForm.planTime[0]).format("YYYY-MM-DD"),
                endDate: moment(ruleForm.planTime[1]).format("YYYY-MM-DD"),
                isHodiday: ruleForm.isHodiday == true ? "1" : "0",
            };
            if (props.type == "add" || props.type == "batchAdd") {
                const res = await equipmentHttp.upkeepPlanAddPlan(params);
                console.log(res);
                if (res.data.code == 200) {
                    emits("closedDialog");
                    ElMessage({
                        message: "提交成功",
                        type: "success",
                    });
                } else {
                    ElMessage({
                        message: res.data.msg,
                        type: "error",
                    });
                }
            } else if (props.type == "edit") {
                const res = await equipmentHttp.upkeepPlanEditPlan(params);
                console.log(res);
                if (res.data.code == 200) {
                    emits("closedDialog");
                    ElMessage({
                        message: "修改成功",
                        type: "success",
                    });
                } else {
                    ElMessage({
                        message: res.data.msg,
                        type: "error",
                    });
                }
            }
        } else {
            ElMessage({
                message: "提交错误",
                type: "error",
            });
        }
    });
};

const classesShowList = ref([]);
// 查询班次信息
const getWorkClassQueryWorkClassShow = async () => {
    let params = {
        depId: ruleForm.depId,
        classType: "1",
        isDelete: "0",
        pageNo: 1,
        pageSize: 1000,
    };
    const res = await schedulingHttp.workClassQueryWorkClass(params);
    if (res.data.code == 200) {
        res.data.data.records.forEach((item) => {
            item.label = item.className;
            item.shortLabel = item.classShortName + "";
            item.value = item.id + "";
            item.statusTrigger = false;
        });
        classesShowList.value = res.data.data.records;
        if (ruleForm.upkeepUserMode == "当日值班班组") {
            typeList.value = classesShowList.value;
        }
    }
};
const userList = ref([]);
const userQueryUserList = async () => {
    let params = {
        depId: ruleForm.depId,
        isDelete: 0,
        pageNo: 1,
        pageSize: 10000,
    };
    const res = await userHttp.userQueryUserList(params);
    if (res.data.code == 200) {
        res.data.data.records.forEach((item) => {
            item.label = item.realName;
            item.value = item.id + "";
        });
        userList.value = res.data.data.records;
        if (ruleForm.upkeepUserMode == "固定人员") {
            typeList.value = userList.value;
        }
    }
};
const groupList = ref([]);
// 查询班组信息
const getWorkteamsQueryWorkTeams = async () => {
    let params = {
        depId: ruleForm.depId,
        pageNo: 1,
        pageSize: 10000,
    };
    const res = await schedulingHttp.workteamsQueryWorkTeams(params);
    if (res.data.code == 200) {
        res.data.data.records.forEach((item) => {
            item.label = item.teamName;
            item.value = item.id + "";
        });
        groupList.value = res.data.data.records;
        if (ruleForm.upkeepUserMode == "固定班组") {
            typeList.value = groupList.value;
        }
    }
};
if (props.type == "batchAdd") {
    ruleForm.depId = props.addEqDepId;
    ruleForm.equipIds = props.addEqId;
    console.log(ruleForm, "ruleForm");
    handleAdd();
} else if (props.type == "add") {
    ruleForm.depId = props.addEqDepId;
    ruleForm.equipIds = props.addEqId;
    handleAdd();
} else {
    ruleForm.depId = props.addEqDepId;
    ruleForm.equipIds = props.addEqId;
    console.log("111111");
    handleClick(props.type);
}
defineExpose({
    submit,
});
onMounted(() => {
    getWorkClassQueryWorkClassShow();
    getWorkteamsQueryWorkTeams();
    userQueryUserList();
    handleAdd();
});
</script>

<style scoped lang="less">
.filter {
    flex-wrap: wrap;
    display: flex;
    flex-direction: row;
    align-items: center;
    .filter-item {
        margin: 0 15px 15px 0px;
        display: flex;
        flex-direction: row;
        align-items: center;
        label {
            font-size: 14px;
            color: #333;
            display: inline-block;
            white-space: nowrap;
        }
    }
}
.radioItem {
    margin-right: 10px;
}
.modelItem {
    padding-left: 120px;
    display: flex;
    flex-direction: row;
    align-items: center;
}
.inspectionInfo {
    display: flex;
    flex-direction: row;
    border-top: 1px solid #ccc;
    .inspectionEq {
        width: 30%;
        border-right: 1px solid #ccc;
    }
    .inspectionProject {
        flex: 1;
    }
    .inspectionP {
        display: flex;
        flex-direction: row;
        padding: 0 20px;
        justify-content: space-between;
        align-items: center;
        span {
            line-height: 3;
        }
    }

    .iconList {
        display: inline-block;
        width: 100px;
        height: 32px;
        box-sizing: border-box;
        text-align: center;
        padding: 1px;
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
    }
    .projectContent {
        padding: 0 20px;
        box-sizing: border-box;
        .projectItem {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 10px;
            padding: 5px;
            background: #fff;
            &.active {
                background: #ddd;
            }
        }
    }
}
</style>